package com.aloha.springframework.test.bean;

import com.aloha.springframework.beans.factory.FactoryBean;
import com.aloha.springframework.test.bean.impl.UserDao;

/**
 * @author DaiZhiHeng
 * @date 2023/7/3 8:28
 */
public class UserDaoFactoryBean implements FactoryBean<UserDao> {

    @Override
    public UserDao getObject() throws Exception {
        UserDao dao = new UserDao();
        dao.initDataMethod();
        return dao;
    }

    @Override
    public Class<?> getObjectType() {
        return UserDao.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
